package woaini.fenger.core.bot.event;

import com.alibaba.fastjson2.annotation.JSONField;
import lombok.Data;
import woaini.fenger.core.bot.enums.PostTypeEnums;
import woaini.fenger.core.bot.id.ID;

import java.io.Serializable;

/**
 * 基本消息 所有消息的基础类
 *
 * @see BaseEvent
 * @author yefeng {@code @Date} 2023-05-16 16:50:39
 */
@Data
public class BaseEvent implements Serializable {

  /**
   * @see MessageSender 发送者信息
   */
  private MessageSender sender;

  /**
   * @see Long 时间戳
   */
  private Long time;

  /**
   * @see ID 收到消息id
   */
  @JSONField(name = "self_id")
  private ID selfId;

  /**
   * @see String 上报类型 message
   */
  @JSONField(name = "post_type")
  private PostTypeEnums postType;
}
